/**
* ...
* @author Default
* @version 0.1
*/

package bdz.common.utils{
	import flash.utils.ByteArray;
	public class ArrayUtils {
		public static function shuffle(my_array:Array):Array {
			var return_array = new Array();
			var original_length = my_array.length;
			for (var i:Number=0; i<original_length; i++) {
				var random_number = Math.floor(Math.random() * (my_array.length));
				return_array[i] = my_array.splice(random_number,1)[0];
			}
			return return_array;
		}
		public static function clone(source:Object):Array{
			var myBA:ByteArray = new ByteArray();
			myBA.writeObject(source);
			myBA.position = 0;
			return(myBA.readObject()) as Array;

		}
	}
	
	
}